package com.alibaba.dubbo.consumer.controller;

import com.alibaba.common.api.service.IInfoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

/**
 * @Author Shengxian.Wang
 * @Date 2021/7/20 18:19
 * @Description
 */
@RestController
public class IInfoServiceController {
    @Reference(version = "1.0.0",group = "demo")
    private IInfoService IInfoService;

    @GetMapping("/favor/getInfo")
    public String getInfo(@RequestParam String name){
        return IInfoService.getInfo(name);
    }

    @GetMapping("/hello/say")
    public String sayHello(){
        return "hello, world.";
    }
}
